import Crypto from 'crypto-js'
// 解密函数
const Decrypt = (word) => {
  const key = Crypto.enc.Utf8.parse('MC6AXG3CY9IZ5JP0') // 十六位十六进制数作为密钥
  const iv = Crypto.enc.Utf8.parse('UMGQ5FDGFS3Z6UGP') // 十六位十六进制数作为密钥偏移量
  let encryptedHexStr = Crypto.enc.Hex.parse(word);
  let srcs = Crypto.enc.Base64.stringify(encryptedHexStr);
  let decrypt = Crypto.AES.decrypt(srcs, key, { iv: iv, mode: Crypto.mode.CBC, padding: Crypto.pad.Pkcs7 });
  let decryptedStr = decrypt.toString(Crypto.enc.Utf8);
  return decryptedStr.toString();
}
export default Decrypt
